<script id="content" type="text/template">
	<div class="btn-group">
		<a href="<!--helper {'anchor-query-state'()}-->" class="btn btn-default <!--if{http().anchor.query.state}--><!--else-->active<!--/if-->">全部状态</a>
		<a href="<!--helper {'anchor-query-state'('1')}-->" class="btn btn-default <!--if{http().anchor.query.state == '1'}-->active<!--/if-->">显示</a>
		<a href="<!--helper {'anchor-query-state'('0')}-->" class="btn btn-default <!--if{http().anchor.query.state == '0'}-->active<!--/if-->">隐藏</a>
	</div>
	
	<input name="image-files" type="file" style="left:-99999px;position:absolute;"/>
	<button type="button" class="btn btn-default" name="image-select"><span class="glyphicon glyphicon-plus"></span> 添加并选择图片</button>
	<button class="btn btn-default" type="button" action-button="sort"><span class="glyphicon glyphicon-sort"></span> 排序</button>
	<button class="btn btn-danger" type="button" action-button="remove"><span class="glyphicon glyphicon-trash"></span> 删除</button>
	<button class="btn btn-default search" type="button" ><span class="glyphicon glyphicon-filter"></span> 筛选</button>
	<!--if{http().anchor.query.search}--><span class="label label-default">存在筛选</span><!--/if-->
	
	<hr/>
	<table class="table table-striped">
      <thead>
        <tr>
          <th><input type="checkbox" action-table="checkbox-all"></th>	
          <th>#</th>
          <th>缩略图</th>
          <th>
          	<!--if{http().anchor.query.sort == "name_desc"}-->
          	<a href="javascript:;" action-sort="name_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>名称</a>
          	<!--elseif{http().anchor.query.sort == "name_asc"}-->
          	<a href="javascript:;" action-sort="name_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>名称</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="name_desc">名称</a>
          	<!--/if-->
          </th>
          <th>简介</th>
          <th>
          	<!--if{http().anchor.query.sort == "module_desc"}-->
          	<a href="javascript:;" action-sort="module_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>模块</a>
          	<!--elseif{http().anchor.query.sort == "module_asc"}-->
          	<a href="javascript:;" action-sort="module_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>模块</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="module_desc">模块</a>
          	<!--/if-->
          </th>
          <th>
          	<!--if{http().anchor.query.sort == "label_desc"}-->
          	<a href="javascript:;" action-sort="label_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>标签</a>
          	<!--elseif{http().anchor.query.sort == "label_asc"}-->
          	<a href="javascript:;" action-sort="label_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>标签</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="label_desc">标签</a>
          	<!--/if-->
          </th>
          <th>
          	<!--if{http().anchor.query.sort == "state_desc"}-->
          	<a href="javascript:;" action-sort="state_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>状态</a>
          	<!--elseif{http().anchor.query.sort == "state_asc"}-->
          	<a href="javascript:;" action-sort="state_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>状态</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="state_desc">状态</a>
          	<!--/if-->
          </th>
          <th>JSON参数</th>
          <th>
          	<!--if{http().anchor.query.sort == "sort_desc"}-->
          	<a href="javascript:;" action-sort="sort_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>排序</a>
          	<!--elseif{http().anchor.query.sort == "sort_asc"}-->
          	<a href="javascript:;" action-sort="sort_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>排序</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="sort_desc">排序</a>
          	<!--/if-->
          </th>
          <th>
          	<!--if{http().anchor.query.sort == "update_time_desc"}-->
          	<a href="javascript:;" action-sort="update_time_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>更新时间</a>
          	<!--elseif{http().anchor.query.sort == "update_time_asc"}-->
          	<a href="javascript:;" action-sort="update_time_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>更新时间</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="update_time_desc">更新时间</a>
          	<!--/if-->
          </th>
          
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
      	<!--if{response.list.data.length}-->
      	<!--for{var i in response.list.data}-->
      	<tr>
          <th><input type="checkbox" action-table="checkbox" data-id="<!--{response.list.data[i].slideshow_id}-->"></th>
          <td><!--{parseInt(i)+1+((parseInt(response.list.page_now) - 1) * response.list.page_size)}--></td>
          <th>
          <!--if{parseInt(response.list.data[i].image_state)}-->
          <img class="image-look" src="<!--{response.application_config.qiniu_domain+response.list.data[i].image_id+'?imageView2/0/w/400'}-->" data-src="<!--{response.application_config.qiniu_domain+response.list.data[i].image_id+'?imageView2/0/w/1200'}-->" data-width="<!--{response.list.data[i].image_width}-->" data-height="<!--{response.list.data[i].image_height}-->" style="height: 50px;cursor: pointer;" />
          <!--else-->
          <span style="color: #999;">未设置</span>
          <!--/if-->
          </th>
          
          <td><!--{response.list.data[i].slideshow_name}--></td>
          	
          <td>
          	<div class="tips" data-title="查看简介" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width: 150px;cursor: pointer;" data="<!--{response.list.data[i].slideshow_info}-->"><!--{response.list.data[i].slideshow_info}--></div>
          </td>
          
          <td>
          <!--if{response.list.data[i].slideshow_module}-->
          <!--helper{'module-name'(response.list.data[i].slideshow_module)}-->
          <div style="color: #999;"><span class="glyphicon glyphicon-tag"></span><!--{response.list.data[i].slideshow_module}--></div>
          <!--else-->
          -
          <!--/if-->
          </td>
          
          <td>
          <!--{response.list.data[i].slideshow_label}-->
          <!--if{response.list.data[i].slideshow_comment}-->
          <div style="color: #999;">#<!--{response.list.data[i].slideshow_comment}--></div>
          <!--/if-->
          </td>
          
          <td>
          <!--if{parseInt(response.list.data[i].slideshow_state)}-->
          <span class="label label-success">显示</span>
          <!--else-->
          <span class="label label-danger">隐藏</span>
          <!--/if-->
          </td>
          
          <td>
          	<div class="tips" data-title="查看JSON参数" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width: 150px;cursor: pointer;" data="<!--{response.list.data[i].slideshow_json}-->"><!--{response.list.data[i].slideshow_json}--></div>
          </td>
          
          <td><input style="width: 80px;" type="text" class="form-control" placeholder="排序" action-table="sort" data-id="<!--{response.list.data[i].slideshow_id}-->" value="<!--{response.list.data[i].slideshow_sort}-->"></td>
          <td><!--{WangAho().date("yyyy/MM/dd HH:mm EEE", parseInt(response.list.data[i].slideshow_update_time) * 1000)}--></td>
          <td>
          	<button class="btn btn-default btn-sm input_edit_open" data-id="<!--{response.list.data[i].slideshow_id}-->"><span class="glyphicon glyphicon-edit"></span>编辑</button>
          </td>
        </tr>
        <!--/for-->
      	<!--else-->
        <tr>
          <td colspan="10" align="center">无数据</td>
        </tr>
        <!--/if-->
      </tbody>
    </table>
    
    
    
    <!--if{response.list.data.length}-->
	<div class="paging" style="text-align: center;">
		<button class="first btn btn-default <!--if helper{"is_first_page" (response.list.page_now)}-->disabled<!--/if-->" data-page="1" type="button">首页</button>
		<button class="previous btn btn-default <!--if helper{"is_first_page" (response.list.page_now)}-->disabled<!--/if-->" data-page="<!--{parseInt(response.list.page_now) - 1}-->" type="button">上一页</button>
		<button class="btn btn-default" type="button">
			第<!--{response.list.page_now}-->页
			/ 共<!--{response.list.page_count}-->页
			/ 有<!--{response.list.row_count}-->条数据</button>
		<button class="next btn btn-default <!--if helper{"is_end_page" (response.list.page_now, response.list.page_count)}-->disabled<!--/if-->" type="button" data-page="<!--{parseInt(response.list.page_now) + 1}-->">下一页</button>
		<button class="end btn btn-default <!--if helper{"is_end_page" (response.list.page_now, response.list.page_count)}-->disabled<!--/if-->" type="button" data-page="<!--{response.list.page_count}-->">尾页</button>
	</div>
	<div class="form-inline" style="text-align: center;margin-top: 10px;">
		<div class="form-group">
			<input type="text" class="form-control paging--value" placeholder="输入跳转页" style="width: 100px;">
		</div>
		<button type="button" class="btn btn-default paging--submit">跳转</button>
	</div>
	<!--/if-->
	
	
	
</script>


<script id="add" type="text/template">
	<div style="padding: 10px;width: 500px;">
		<div class="form-group">
	    	<label>图片：</label>
	    	<img class="image-look" src="<!--{file.src}-->" style="max-height: 50px; cursor: pointer;display: block;">
	  	</div>
		
		<div class="form-group">
	    	<label>名称：</label>
	    	<input type="text" class="form-control" placeholder="输入轮播图的名称" name="slideshow_name">
	  	</div>
	  	<div class="form-group">
	    	<label>简介：</label>
	    	<input type="text" class="form-control" placeholder="输入轮播图的简介" name="slideshow_info">
	  	</div>
	  	<div class="form-group">
	    	<label>模块：</label>
		  	<select class="form-control" name="slideshow_module">
			  <option value="">-请选择-</option>
			  <!--if{response.slideshow_module_option}-->
			  <!--for{var i in response.slideshow_module_option}-->
			  <option value="<!--{i}-->" ><!--{response.slideshow_module_option[i]}--></option>
			  <!--/for-->
			  <!--/if-->
			</select>
	  	</div>
	  	<div class="form-group">
	    	<label>标签：</label>
	    	<input type="text" class="form-control" placeholder="输入轮播图的标签" name="slideshow_label">
	  	</div>
	  	<div class="form-group">
	    	<label>注释：</label>
	    	<input type="text" class="form-control" placeholder="输入轮播图的注释" name="slideshow_comment">
	  	</div>
	  	<div class="form-group">
	    	<label>JSON配置：</label>
	    	<textarea class="form-control" rows="2" placeholder="输入轮播图的JSON配置" name="slideshow_json"></textarea>
	  	</div>
	  	<div class="form-group">
	    	<label>排序：</label>
	    	<input type="text" class="form-control" placeholder="输入轮播图的排序" name="slideshow_sort">
	  	</div>
	  	<div class="form-group">
	    	<label>是否隐藏：</label>
	    	<label class="checkbox-inline">
				<input type="checkbox" value="0" name="slideshow_state"> 是
			</label>
	  	</div>
	  	<br/>
	  	<button type="button" class="btn btn-primary btn-block" name="add-submit">确定添加</button>
	</div>
</script>





<script id="edit" type="text/template">
	<div style="padding: 10px;width: 500px;">
		<div class="form-group">
	    	<label>图片：</label>
	    	<!--if{parseInt(slideshow_data.image_state)}-->
	          <img class="image-look" src="<!--{qiniu_domain+slideshow_data.image_id+'?imageView2/0/w/400'}-->" data-src="<!--{qiniu_domain+slideshow_data.image_id+'?imageView2/0/w/1200'}-->" data-width="<!--{slideshow_data.image_width}-->" data-height="<!--{slideshow_data.image_height}-->" style="height: 50px;cursor: pointer;" />
	          <!--else-->
	          <span style="color: #999;">未设置</span>
	          <!--/if-->
	  	</div>
		<div class="form-group">
	    	<label>ID：</label>
	    	<input type="text" class="form-control" name="slideshow_id" readonly="readonly" value="<!--{slideshow_data.slideshow_id}-->">
	  	</div>
		<div class="form-group">
	    	<label>名称：</label>
	    	<input type="text" class="form-control" placeholder="输入轮播图的名称" name="slideshow_name" value="<!--{slideshow_data.slideshow_name}-->">
	  	</div>
	  	<div class="form-group">
	    	<label>简介：</label>
	    	<input type="text" class="form-control" placeholder="输入轮播图的简介" name="slideshow_info" value="<!--{slideshow_data.slideshow_info}-->">
	  	</div>
	  	<div class="form-group">
	    	<label>模块：</label>
		  	<select class="form-control" name="slideshow_module">
			  <option value="">-请选择-</option>
			  <!--if{response.slideshow_module_option}-->
			  <!--for{var i in response.slideshow_module_option}-->
			  <option value="<!--{i}-->" <!--if{slideshow_data.slideshow_module == i}-->selected="selected"<!--/if--> ><!--{response.slideshow_module_option[i]}--></option>
			  <!--/for-->
			  <!--/if-->
			</select>
	  	</div>
	  	
	  	<div class="form-group">
	    	<label>标签：</label>
	    	<input type="text" class="form-control" placeholder="输入轮播图的标签" name="slideshow_label" value="<!--{slideshow_data.slideshow_label}-->">
	  	</div>
	  	<div class="form-group">
	    	<label>注释：</label>
	    	<input type="text" class="form-control" placeholder="输入轮播图的注释" name="slideshow_comment" value="<!--{slideshow_data.slideshow_comment}-->">
	  	</div>
	  	<div class="form-group">
	    	<label>JSON配置：</label>
	    	<textarea class="form-control" rows="2" placeholder="输入轮播图的JSON配置" name="slideshow_json"><!--{slideshow_data.slideshow_json}--></textarea>
	  	</div>
	  	<div class="form-group">
	    	<label>排序：</label>
	    	<input type="text" class="form-control" placeholder="输入轮播图的排序" name="slideshow_sort" value="<!--{slideshow_data.slideshow_sort}-->">
	  	</div>
	  	<div class="form-group">
	    	<label>是否隐藏：</label>
	    	<label class="checkbox-inline">
				<input type="checkbox" value="0" name="slideshow_state" <!--if{parseInt(slideshow_data.slideshow_state)}--><!--else-->checked="checked"<!--/if-->> 是
			</label>
	  	</div>
	  	<br/>
	  	<button type="button" class="btn btn-primary btn-block" name="edit-submit">确定编辑</button>
	</div>
</script>




<script id="search" type="text/template">
	<div style="padding: 10px;width: 500px;">
		<div class="form-group">
		    <label>轮播图ID：</label>
		    <input type="text" class="form-control" search placeholder="输入要搜索的轮播图ID" name="slideshow_id" value="<!--{search.slideshow_id}-->">
		</div>
		<div class="form-group">
		    <label>轮播图名称：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的轮播图名称" name="slideshow_name" value="<!--{search.slideshow_name}-->">
		</div>
		<div class="form-group">
		    <label>轮播图标签：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的轮播图标签" name="slideshow_label" value="<!--{search.slideshow_page}-->">
		</div>
		<div class="form-group">
	    	<label>分类模块：</label>
		  	<select class="form-control" name="slideshow_module">
			  <option value="">-请选择模块-</option>
			  <!--if{response.slideshow_module_option}-->
			  <!--for{var i in response.slideshow_module_option}-->
			  <option value="<!--{i}-->" <!--if{search.slideshow_module == i}-->selected="selected"<!--/if--> ><!--{response.slideshow_module_option[i]}--></option>
			  <!--/for-->
			  <!--/if-->
			</select>
	  	</div>
		
		<br/>
		<div class="btn-group" style="width: 100%;">
			<button type="button" class="btn btn-primary" style="width: 50%;" name="search-submit">确定筛选</button>
			<button type="button" class="btn btn-default" style="width: 50%;" name="search-clear">清理筛选</button>
		</div>
	</div>
</script>

